package DateStructure;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 殇
 * Date: 2025-07-24
 * Time: 10:06
 */
public class ArrayList0 {
    public static void main(String[] args) {
        List<Integer> list1=new ArrayList<>();
        List<Integer> list2=new ArrayList<>(2);
        List<Integer> list3=new ArrayList<>(list1);

        list1.add(1);
        list1.add(1,2);
        list1.add(2,3);
        //System.out.println(list1.remove(2));
        //list1.remove(new Integer(2));
        //System.out.println(list1.get(0));

        //System.out.println(list1);
        //System.out.println(list1.set(0,2));
        //System.out.println(list1.contains(2));
        List<Integer> tmp=list1.subList(0,1);
        System.out.println(tmp);
        tmp.set(0,3);
        System.out.println(tmp);
        System.out.println(list1);





    }
}
